<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>成绩等级查询</title>
</head>
<body>
    <script>
        var x=Number(prompt("请输入你的成绩"));
        if(x>=80)
        alert('你的成绩为优');
        else if(x>=60)
        alert("你的成绩合格");
        else
        alert('你的成绩不合格');
    </script>
</body>
</html>